<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
    String ctx = request.getContextPath();
    request.setAttribute("ctx", ctx);
%>
<html>
<head>
    <title>Title</title>
    <script src="js/jquery-1.8.2.min.js"></script>
    <script src="js/fileupload.js"></script>
    <script src="My97DatePicker/WdatePicker.js"></script>
    <link rel="stylesheet" href="css/img.css">
    <script>
        function add() {
            var formData = new FormData($("form")[0])
            $.ajax({
                       url:"add.do",
                       type:"post",
                       data:formData,
                       dataType:"json",
                       success:function(obj) {
                            if (obj>0){
                                alert("添加成功");
                                location="list.do"
                            }
                       },
                processData:false,
                contentType:false
                  })
        }
    </script>
</head>
<body>
<form action="add.do" method="post">
    收货日期:<input type="text" name="date"><br>
    收货单号:<input type="text" name="danhao"><br>
    优先级:<input type="text" name="youxian"><br>
    状态:<input type="text" name="status"><br>
    备注:<input type="text" name="beizhu"><br>
    客户:<input type="text" name="mid"><br>
    客户发货单列:<input type="text" name="fhdanhao"><br>
    制单人工号:<input type="text" name="zdrgonghao"><br>
    制单时间:<input type="text" name="zhidandate"><br>
    收货附件:
    <div class="photoUpLoad">
        <input type="file" name="photo" class="photo" accept="image/*"><span class="cross">+</span>
        <img src="" alt="" class="photoEcho">
    </div><br>
    <input type="button" value="添加" onclick="add()">
</form>
</body>
</html>
